package com.csu.petstore.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.csu.petstore.exception.Validation.IsPhone;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@TableName("account")
public class Account {
    @TableId
    @NotBlank(message = "userid不能为空！")
//    @Size(min = 6, max = 12, message = "userid长度必须在6到12之间！")
    String userid;
    @TableField(exist = false)
    String password;
    @TableField(exist = false)
    String repeatpassword;
    @NotBlank(message = "firstname不能为空！")
    String firstname;
    @NotBlank(message = "lastname不能为空！")
    String lastname;
    String email;
//    @IsPhone
    String phone;
    @NotBlank(message = "addr1不能为空！")
    String addr1;
    @NotBlank(message = "addr2不能为空！")
    String addr2;
    @NotBlank(message = "city不能为空！")
    String city;
    @NotBlank(message = "state不能为空！")
    String state;
    @NotBlank(message = "zip不能为空！")
    String zip;
    @NotBlank(message = "country不能为空！")
    String country;
}
